﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo05
{
    //创建 Compute 类，分别定义 4 个方法实现加法、减法、乘法、除法的操作。
    public class Compute
    {
        public double num1;
        public double num2;
        public Compute (double num1 ,double num2)
         {
            this.num1 = num1;
            this.num2 = num2;
         }
        public void   Add ()
        {
            Console.WriteLine("这是求和{0}", this.num1 + this.num2);
        }
        public void Minus()
        {
            Console.WriteLine("这是求差{0}", this.num1 - this.num2);
        }
        public void Multipy()
        {
            Console.WriteLine("这是求积{0}", this.num1 * this.num2);
        }
        public void Divide()
        {
            Console.WriteLine("这是除法{0}", this.num1 / this.num2);
        }


    }
}

